package com.huoshan.im.server.messaging;

/**
 * 说明：作者很懒，什么都没留下
 * Created by 火山九日 on 2020-04-26 09:10
 */
public enum MessageId {

    //通用消息
    NORMAL_PARAMETER(-1, "参数错误"),
    NORMAL_HEARTBEAT(1, "心跳"),
    NORMAL_HEARTBEAT_RECEIVED(100, "收到心跳"),
    NORMAL_LOGIN(101, "登录"),

    // 来自客户端的消息
    MESSAGE_FROM_CLIENT(1000, "来自于客户端的消息"),
    MESSAGE_FROM_REPEATER(1001, "来自于repeater的消息"),

    //服务端给客户端消息
    MESSAGE_FROM_SERVER(2000, "来自于server的消息"),

    //客户端消息
    CLI_SEND_TO_SOMEBODY(2001, "向某人发送消息含向系统发送，如小秘书"),
    CLI_SEND_TO_GROUP(2002, "向群组发送消息"),

    //服务端给客户端消息
    SRV_AUTH_NO_LOGIN(2101, "没有登录"),
    SRV_AUTH_FORBIDDEN(2102, "没有权限"),
    SRV_LOGIN_FAIL(2103, "登录失败"),
    SRV_LOGIN_SUCCESS(2104, "登录成功"),

    SRV_SEND_MESSAGE(2105, "服务端发送消息"),


    //系统内部消息
    SYS_LOGIN(9990001, "系统登录"),
    SYS_KICK_USER_OFFLINE(9990002, "踢用户下线"),
    SYS_KICK_SYS_OFFLINE(9990003, "系统被挤下线"),

    //server to repeater close session
    SERVER_ON_CLOSE_SESSION(9999, "与客户端断线后发给repeater的消息"),

    //响应给客户端
    RESPONSE_SUCCESS_MESSAGE(80000, "响应成功消息"),
    RESPONSE_FAIL_MESSAGE(80001, "响应失败消息"),

    ;

    public final int id;
    public final String meaning;

    MessageId(int id, String meaning) {
        this.id = id;
        this.meaning = meaning;
    }

}
